package com.example.auto.inventory.system;

import android.app.Activity;
import android.content.Context;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.EditText;
import android.widget.ListView;

public class launch_activity3 extends Activity implements TextWatcher {
	ListAdapter ad;
	EditText txtsearch;
	ListView lv;

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main3);
		
		DB.act = this;

		txtsearch = (EditText) findViewById(R.id.txtsearch);
		txtsearch.addTextChangedListener(this);

		lv = (ListView) findViewById(R.id.lvscheduler);

		// TODO Auto-generated method stub
	}

	public void afterTextChanged(Editable arg0) {
		ad = new ListAdapter(this, txtsearch.getText().toString());
 		lv.setAdapter(ad);
 		ad.notifyDataSetChanged();
	}

	public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,
			int arg3) {
		// TODO Auto-generated method stub

	}

	public void onTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {


	}

}
